library(RPostgreSQL)
con <- dbConnect(PostgreSQL(), user= "stuff", password= "stuff", dbname= "census")


stuff=dbListTables(con)
grep("ct", stuff, value=T)

library(rgdal)

t1971 =readOGR("PG:dbname=census user=stuff password=stuff", "y1971.ca_ct_crt")

		t1981=readOGR("PG:dbname=census user=stuff password=stuff", "y1981.ca_ct_crt")

t1991=readOGR("PG:dbname=census user=stuff password=stuff", "y1991.ca_ct_dbf")
		
t1996=readOGR("PG:dbname=census user=stuff password=stuff", "y1996.ca_ct_dcf")

t2001 = readOGR("PG:dbname=census user=stuff password=stuff", "y2001.ca_ct_cbf")

theBBox = list(x=c(-79.6, -79.2), y=c(43.65, 43.9))

pdf("torCT.pdf",height=5,width=3)
library(sp)
plot(t1971, xlim=theBBox$x, ylim=theBBox$y, lwd=2,border="grey")
#plot(t1981, add=T, border="blue",lwd=2)
#plot(t1981, add=T, border="green",lwd=1.5)
#plot(t1991, add=T, border="red",lwd=1)
plot(t2001, add=T, border="black",lwd=0.1)
dev.off()
